/* Filename: hello.c
 * Description: <TODO>
 * $ gcc -Wall -fopenmp hello1.c -o hello1
 * Last modified: humble 20200418 22:16
 */
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>

static void usage(void);

int main(int argc, char **argv)
{
    if(argc != 1){
        fprintf(stderr, "argc !=1");
        usage();
        exit(1);
    }

#pragma omp parallel sections //openmp 语法标记
    {
#pragma omp section //openmp 语法标记
        printf("[%d]Hello\n", omp_get_thread_num());
#pragma omp section //openmp 语法标记
        printf("[%d]World\n", omp_get_thread_num());
    }
    return 0;
}

static void usage(void)
{
#define USAGE "Usage:\n\
  Helloworld\n"
    printf(USAGE);
}
